package ar.edu.utn.frba.tacs.warnes.dao;

import java.util.List;

import org.hibernate.Session;

import ar.edu.utn.frba.tacs.warnes.entities.BaseEntity;

/**
 * 
 * @author dmiglino
 *
 * @param <BaseEntity>
 */
public interface BaseDao<T extends BaseEntity> {
	
	public Session getSession();

	abstract Class<T> getModelClass();

//	public void crearSession();

//	public void cerrarSession();

	public List<T> list() throws IllegalArgumentException;

	public List<T> list(Class<? extends BaseEntity> klass)
			throws IllegalArgumentException;

	public void save(T obj) throws IllegalArgumentException;

	public void delete(T obj) throws IllegalArgumentException;
	
	public int count();

	public T uniqueResult(Long id);
}
